import request from '@/utils/request'
// 新增部门
export const addRoles = data => request.post('/sys/role', data)
// 获取所有部门
export const getRoles = params => request.get('/sys/role', { params })
// 根据ID修改部门详情
export const updateRoles = data => request.put(`/sys/role/${data.id}`)
// 根据ID删除部门
export const delateRoles = id => request.delete(`/sys/role/${id}`)
// 根据ID查询部门详情
export const getRolesDeatil = id => request.get(`/sys/role/${id}`)
// 给角色分配权限
export const assignPermission = data => request.put(`/sys/role/assignPrem`, data)

export const assignPerm = data => request.put(`/sys/role/assignPrem`, data)
